
import request from '@/utils/request.js'
 export const articleCateService = () => {
    return request.get('/category')

}

export const addCategoryService = (categoryData) => {
    return request.post('/category',categoryData)
}

export const updateCategoryService = (categoryData) => {
    return request.put('/category',categoryData)
}

export const delCategoryService = (id) => {
    return request.delete('/category',{params:{id:id}})
}

export const articleListByPageService = (params) => {
    return request.get('/article',{params : params})
}

export const addOrAupdateArticleService = (articleData) => {
    return request.post('/article',articleData)
}

export const delArticleService = (id) => {
    return request.delete(`/article/${id}`)
}

export const editArticleService = (articleData) => {
    return request.put('/article',articleData)
}




